<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>
	<body>
		<script>
			//  * 小数点后若为0，也要展示出来（四舍五入)
			let fomatFloat = (value, n) => {
				var f = Math.round(value * Math.pow(10, 1)) / Math.pow(10, 1)
				var s = f.toString()
				var rs = s.indexOf('.')
				if (rs < 0) {
					s += '.'
				}
				for (var i = s.length - s.indexOf('.'); i <= 1; i++) {
					s += '0'
				}
				return s
			}
		</script>
	</body>
</html>
